home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-16 | 1.7 KB | 34 lines | [TEXT/MPS ] |
- #----------------------------------------------------------------------------------------------------------------------------------------------------
- # AddDeleteMenu
- # MPW Shell Script
- # Written by Gina Cherry • August 16, 1991
- # Copyright: © 1991 by Apple Computer, Inc., all rights reserved.
- #
- # Usage:
- # AddDeleteMenu
- #
- # Function:
- # AddDeleteMenu adds the menu item Delete to the Command menu. Delete displays a standard file
- # dialog box with a delete button. The user chooses a file to be deleted, and Delete deletes the
- # file. Delete does not ask for confirmation before deleting the file.
- #----------------------------------------------------------------------------------------------------------------------------------------------------
-
- # Add item Delete to Commands menu. When invoked, Delete will execute the following commands:
- # Display a standard file dialog box with a delete button. The dialog will contain the message
- # "Select a file to delete." The file dialog will return 0 status even if cancel is selected by the user.
- # Set File to the name of the File chosen from the file dialog. If Cancel is chosen, File will be
- # set to the null string. If Cancel is not chosen, Delete deletes the file File.
-
- # Note: the ∂ (option d) character is used to terminate each of the following lines because AddMenu
- # expects to find all the commands on one line.
-
- AddMenu Commands 'Delete File/-' ∂
- ∂
- 'Set File "`GetFileName -m " Select a file to delete" -b Delete -s`"; ∂
- If {File} != ""; ∂
- Delete {File}; ∂
- End'
-
-
-
-